import React from 'react';

export class Item extends React.Component {
  render() {
    console.log(this.props);
    return (
      <div
        style={{
          padding: 20,
          border: '2px solid #000',
          margin: 10,
          borderRadius: 5,
        }}
      >
        <h3>标题：{this.props.name}</h3>
        <div>价格：{this.props.price}</div>
        <div>{this.props.info}</div>
        <button onClick={() => this.props.kan(this.props.id, 1)}>砍价</button>
      </div>
    );
  }
}

export default Item;
